config: fix default value for allow_slaac_only
authorÁlvaro Fernández Rojas <[email protected]>
Sat, 6 Dec 2025 12:32:38 +0000 (13:32 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Sat, 6 Dec 2025 12:34:24 +0000 (13:34 +0100)
As reported by @nxhack at https://github.com/openwrt/odhcp6c/issues/131,
allow_slaac_only was assigned an incorrect default value when it was moved
from odhcp6c.c to config.c.

Fixes: 1048fc4fb622 ("reconfigure: move all configuration functions to a new file")
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/config.c

index 18b725aabad62a80fd44f037e480e35e890ef064..f7977b4e59addbef726896a884a1984a309c361f 100644 (file)
@@ -85,7 +85,7 @@ void config_dhcp_reset(void) {
        config_dhcp.ia_na_mode = IA_MODE_TRY;
        config_dhcp.ia_pd_mode = IA_MODE_NONE;
        config_dhcp.client_options = DHCPV6_CLIENT_FQDN | DHCPV6_ACCEPT_RECONFIGURE;
-       config_dhcp.allow_slaac_only = -1;
+       config_dhcp.allow_slaac_only = 0;
        config_dhcp.oro_user_cnt = 0;
        memset(config_dhcp.message_rtx, 0, sizeof(config_dhcp.message_rtx));
        config_dhcp.message_rtx[CONFIG_DHCP_SOLICIT].delay_max = DHCPV6_MAX_DELAY;